<?php

class App_Controller_Action extends Zend_Controller_Action
{

	/**
	 *
	 * @var boolean
	 */
	protected $_requireLogin = true;

	public function init()
	{
		parent::init();

		if ($this->_requireLogin)
		{
			// redirect to login if not logged in
			$auth = Zend_Auth::getInstance();
			if (!$auth->hasIdentity())
			{
				$this->_helper->redirector->gotoRouteAndExit(array('controller' => 'user', 'action' => 'login'), 'default', 'true');
			}
		}
	}

}